package com.esd.db.dao;

import java.util.List;
import java.util.Map;

import com.esd.db.model.VtdComment;;

public interface VtdCommentMapper {
	
	/**
	 * 保存
	 */
	int insertVtdComment(VtdComment comment);
	
	/**
	 * 根据文章id查询评论列表
	 */
	List<VtdComment> selectAllByArticleId(String articleId);

	VtdComment selectById(String id);

	List<VtdComment> selectAllByPid(String pid);

	List<VtdComment> selectCommentListForInspection(Map<String, Object> map);
	
	int selectCommentListForInspectionCount();

	int deleteById(String id);

	int commentIsGranted(String id);

	int selectTotleCommentNum(String articleId);

	int selectUnreadMsgNumByUserId(int userId);

	List<VtdComment> selectByTargetUserId(Map<String, Object> map);

	int selectCommentReplyListByTargetUserIdCount(int targetUserId);

	int updateCommentUnreadStatus(int userId);
	
}